import { name } from "./../../package.json";
export const env = (() => {
  const host = window.location.host;
  if (
    host.indexOf("localhost") > -1 ||
    host.indexOf("dev") > -1 ||
    host.indexOf("mock") > -1 ||
    host.indexOf("192") > -1 ||
    host.indexOf("127") > -1
  ) {
    return `dev`;
  } else if (host.indexOf("daily") > -1) {
    return `daily`;
  } else if (host.indexOf("gray.") > -1) {
    return "gray";
  }
  return "prod";
  // return "daily";
})();

export const href = (() => {
  // const hrefs = {
  //   daily: `https://mass-api.daily.xinc818.net/`,
  //   dev: `https://mass-api.dev.xinc818.net/`,
  //   gray: `https://mass-api.gray.xinc818.net/`,
  //   prod: `https://mass-api.xinc818.com/`
  // };
  // return localStorage.env || hrefs[env];
  return "http://localhost:3000/";
})();
